import java.util.List;

public class RPSHist {
	List<RPS> computerHist;
	List<RPS> playerHist;
	int rock = 0;
	int paper = 0;
	int scissors = 0;

	public String toString() {
		String r = rock + "," + paper + "," + scissors;
		for (int i = 0; i < computerHist.size(); i++) {
			r += "," + playerHist.get(i).toString().substring(0, 1) + ","
					+ computerHist.get(i).toString().substring(0, 1);
		}
		return r;
	}

	public boolean match(List<RPS> p, List<RPS> c) {
		for (int ii = 0; ii < 3; ii++) {
			if (p.get(ii) != playerHist.get(ii)
					|| c.get(ii) != computerHist.get(ii))
				return false;
		}
		return true;
	}
}
